package com.woniuxy.lifeorder.api.feign;

import com.woniuxy.life.core.api.CommonResult;
import com.woniuxy.life.core.api.OrderCode;
import com.woniuxy.lifeorder.api.dto.Orderitem;
import com.woniuxy.lifeorder.api.feign.factory.OrderItemServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(
        contextId = "orderItemService",
        value = OrderCode.ORDER_SERVICE,
        fallbackFactory = OrderItemServiceFallbackFactory.class
)
public interface OrderItemService {
    @GetMapping("/orderitem/list")
    public CommonResult<List<Orderitem>> listCommonResult(Orderitem orderitem);
    @PostMapping("/orderitem/insertone")
    public CommonResult insertOne(Orderitem orderitem);
    @PostMapping("/orderitem/insertAll")
    public CommonResult insertAll(List<Orderitem> orderitems);
    @DeleteMapping("/orderitem/delete")
    public CommonResult deleteOne(Integer orderitemId);
}
